package com.maybach.dubbo.api.service;

import com.maybach.dubbo.api.BizResult;
import com.maybach.dubbo.api.model.*;
import com.maybach.dubbo.api.query.LoanOrderQueryModel;
import com.maybach.util.query.support.PageResult;

/**
 * Created by houenxun on 16/2/24.
 * 订单宝接口
 */

public interface ILoanOrderService {
    /**
     * 创建订单宝
     * @return
     */
    BizResult<LoanOrderCreateResultModel> createLoanOrder(CreateLoanOrderModel model);

    /**
     * 查询订单宝详情
     * @param loanOrderId
     * @return
     */
    BizResult<LoanOrderDetailModel> queryLoanOrderDetail(Long loanOrderId);

    /**
     * 关闭订单宝
     * @param orderId
     * @return
     */
    BizResult<Void> closeOrder(Long orderId);

    /**
     * 分业查询订单休宁县
     * @param query
     * @return
     */
    BizResult<PageResult<LoanOrderModel>> queryLoanOrder(LoanOrderQueryModel query);

    /**
     * 申请完善资料
     * @param model
     * @return
     */
    BizResult<Void> submitOrderInfo(OrderInfoModel model);

    /**
     * 查询订单数量
     * @param buyerId
     * @param status
     * @return
     */
    BizResult<Integer> countOrder(Long buyerId, Integer status);



}
